﻿<%@ Register TagPrefix="cc1" Namespace="Mysoft.PubProject.Business" Assembly="Mysoft.PubProject.Business" %>

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Khfp_fpXjy.aspx.vb" Inherits="Slxt.Khfp_fpXjy" %>

<%@ Register TagPrefix="cnt" Namespace="Mysoft.Map.Application.Controls" Assembly="Mysoft.Map.Application.Components" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
    <title>分配新交易</title>
    <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1" />
    <meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1" />
    <meta name="vs_defaultClientScript" content="JavaScript" />
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />

    <script language="javascript" type="text/javascript" src="/_controls/settings.aspx"></script>

    <link rel="stylesheet" type="text/css" href="/_grid/map_grid.css" />
    <link rel="stylesheet" type="text/css" href="/_common/styles/global.css" />
    <link rel="stylesheet" type="text/css" href="/_nav/taskbox.css" />
    
    <!-- select -->
    <link rel="stylesheet" type="text/css" href="/MyWorkflow/css/form.css" />

    <script language="javascript" type="text/javascript" src="/_common/scripts/global.js"></script>

    <script language="javascript" type="text/javascript" src="/_controls/find/find.js"></script>

    <script language="javascript" type="text/javascript" src="/_controls/util/util.js"></script>

    <script language="javascript" type="text/javascript" src="/_controls/datetime/date.js"></script>

    <script language="javascript" type="text/javascript" src="/Slxt/js/Public.js"></script>
    <!-- DropDownTree -->
    <link rel="stylesheet" type="text/css" href="/_controls/tree/dropdowntree.css" />
    <link rel="stylesheet" type="text/css" href="/pubproject/_controls/CRMControls/ProjDDTree.css" />

    <script language="javascript" type="text/javascript" src="/slxt/js/Public.js"></script>

    <script language="javascript" type="text/javascript">
        //在线帮助文件
        var _MyHelpfile = "";

        function window.onload() {
            doQuery();
        }

        // 查询事件
        function doQuery() {
            //校验条件
            if (!vaildeFilter()) { return; }
            // 设置URL和参数
            var strUrl = appIframe.frameElement.url + "?";
            var aryParams = [];
            aryParams.push("funcid=" + __funcid.value);
            aryParams.push("ProjGUID=" + appProjTree.value);
            aryParams.push("RoomInfo=" + escape(document.getElementById("txtRoom").value));
            aryParams.push("CstName=" + escape(document.getElementById("txtCstName").value));
            aryParams.push("ContractNo=" + escape(document.getElementById("txtContractNo").value));
            aryParams.push("Status=" + escape(document.getElementById("cboSaleState").returnValue));
            aryParams.push("BeginQsDate=" + escape(document.getElementById("txtBeginQsDate").value));
            aryParams.push("EndQsDate=" + escape(document.getElementById("txtEndQsDate").value));
            
            // 连接
            appIframe.location = strUrl + aryParams.join("&");
        }

        // 校验查询数据
        function vaildeFilter() {
            var strBeginQsDate = document.getElementById("txtBeginQsDate").value;
            var strEndQsDate = document.getElementById("txtEndQsDate").value;
            if (strBeginQsDate != "" && strEndQsDate != "") {
                if (strEndQsDate < strBeginQsDate) {
                    alert("截止日期要大于等于起始日期！");
                    return false;
                }
            }
            return true;
        }
        
        // 功能：选择房产
        function SelectRoomInfo(o) {
            if (appProjTree.value == "") return;

            var sRoomInfo = ChooseRoomInfo("", "01010304", appProjTree.value);
            if (sRoomInfo == undefined || sRoomInfo == "") return;
            o.parentElement.previousSibling.firstChild.value = sRoomInfo;

        }	

        
    </script>

</head>
<body ms_positioning="GridLayout" class="tab" >
    <cnt:AppLog ID="appLog" runat="server" Funcid="01010608" />
    <table style="font-size: 9pt" height="100%" border="0" cellspacing="0" cellpadding="0"
        width="100%">
        <tr height="30">
            <td>
                <!--Begin of 下拉列表控件-->
               <table style="table-layout: fixed; vertical-align: text-bottom; width: 100%; height: 30px"
                    cellspacing="0" cellpadding="1" border="0">
                    <colgroup>
                        <col width="50%" />
                        <col width="20" />
                        <col />
                    </colgroup>
                    <tr>
                        <td>
                            <table width="100%" cellspacing="0" cellpadding="0">
                                <colgroup>
                                    <col width="60" />
                                    <col />
                                </colgroup>
                                <tr height="25">
                                    <td><b style="COLOR:#666666">项目</b></td>
                                    <td>
                                        <form id="Form2" method="post" runat="server" style="display: inline">
                                        <asp:HiddenField ID="hidUserGUID" runat="server" />
                                        <cc1:ProjDDTree2 ID="appProjTree" runat="server" DisplayHiberarchy="Project" OnQuery="doQuery()"
                                            IsSelectLastLevelOnly="True" IsSelectAll="False" ProjField="Opp.ProjGUID" ApplySys="销售管理" Width="100%" />
                                        </form>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td>&nbsp;</td>
                        <td>
                            <table cellspacing="0" cellpadding="0" width="100%">
                                <colgroup>
                                    <col width="50%" />
                                    <col width="20" />
                                    <col />
                                </colgroup>
                                <tr>
                                    <td>
                                          <table cellspacing="0" cellpadding="0" width="100%">
                                            <tr>
                                                 <td width="60">
                                                    销售状态
                                                </td>
                                                <td align="left">
                                                    <span id="cboSaleState" class="selectBox" typename="mapType" style="width:100%" name="cboSaleState"
                                                        value="">
                                                        <table id="_Preferred_Table_1" cellspacing="0" style="display: none;">
                                                            <tr height="18" value="all">
                                                                <td nowrap val="all">
                                                                    --全部--
                                                                </td>
                                                            </tr>
                                                            <tr height="18" value="小订">
                                                                <td nowrap val="小订">
                                                                    小订
                                                                </td>
                                                            </tr>
                                                            <tr height="18" value="认购">
                                                                <td nowrap val="认购">
                                                                    认购
                                                                </td>
                                                            </tr>
                                                            <tr height="18" value="签约">
                                                                <td nowrap val="签约">
                                                                    签约
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </span>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                    <td colspan="2">&nbsp;</td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <table cellspacing="0" cellpadding="0" width="100%">
                                <colgroup>
                                    <col width="60" />
                                    <col />
                                </colgroup>
                                <tr>
                                    <td>
                                        房间
                                    </td>
                                    <td>
                                        <table style="table-layout: fixed" cellspacing="0" cellpadding="0" width="100%">
                                            <colgroup>
                                                <col />
                                                <col align="right" width="25" />
                                            </colgroup>
                                            <tbody>
                                                <tr>
                                                    <td>
                                                        <input style="width: 100%" type="text" id="txtRoom" name="txtRoom" />
                                                    </td>
                                                    <td align="right">
                                                        <img style="cursor: hand" onclick="SelectRoomInfo(this)" src="/_imgs/btn_off_lookup.gif" />
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td>&nbsp;</td>
                        <td>
                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                <colgroup>
                                    <col width="50%" />
                                    <col width="20" />
                                    <col />
                                </colgroup>
                                <tr>
                                    <td>
                                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                            <colgroup>
                                                <col width="60" />
                                                <col />
                                            </colgroup>
                                            <tr>
                                                <td>
                                                    客户姓名
                                                </td>
                                                <td>
                                                    <input style="width: 100%" type="text" id="txtCstName" name="txtCstName" />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                    <td colspan="2">&nbsp;</td>
                                </tr>
                            </table>

                        </td>
                    </tr>
                    <tr>
                        <td>
                            <table  cellspacing="0" cellpadding="0" width="100%">
                                <colgroup>
                                    <col width="60" />
                                    <col />
                                    <col width="90"/>
                                    <col width="140"/>
                                </colgroup>
                                <tr>
                                    <td>
                                        协议编号
                                    </td>
                                    <td>
                                        <input style="width: 100%" type="text" id="txtContractNo" name="txtContractNo" />
                                    </td>
                                    <td align="center">
                                        签署日期&nbsp;从
                                    </td>
                                    <td>
                                        <table width="100%" border="0" cellpadding="1" cellspacing="0" style="table-layout: fixed;"
                                            align="left">
                                            <tr>
                                                <td>
                                                    <input style="width: 100%" type="text" id="txtBeginQsDate" name="txtBeginQsDate"
                                                        maptype="dtm" time="0" class="dtm" maxlength="16" value="" returnValue="">
                                                </td>
                                                <td width="37px" align="left">
                                                    <img style="cursor: hand" align="middle" class="dtm" src="/_imgs/btn_off_cal.gif">
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td>&nbsp;</td>
                        <td>
                            <table  width="100%" border="0" cellpadding="0" cellspacing="0">
                                <colgroup>
                                    <col width="60" />
                                    <col />
                                </colgroup>
                                <tr>

                                    <td>
                                        <table  width="100%" border="0" cellpadding="0" cellspacing="0">
                                            <colgroup>
                                                <col width="50%" />
                                                <col width="20"/>
                                                <col />
                                            </colgroup>
                                            <tr>
                                                    <td>
                                                         <table  width="100%" border="0" cellpadding="0" cellspacing="0">
                                                            <colgroup>
                                                                <col width="60" />
                                                                <col />
                                                            </colgroup>
                                                            <tr>
                                                                <td>
                                                                    到
                                                                </td>
                                                                <td>
                                                                     <table width="100%" border="0" cellpadding="1" cellspacing="0" style="table-layout: fixed;"
                                                                            align="left">
                                                                            <tr>
                                                                                <td>
                                                                                    <input style="width: 100%" type="text" id="txtEndQsDate" name="txtEndQsDate" maptype="dtm"
                                                                                        time="0" class="dtm" maxlength="16" value="" returnValue="">
                                                                                </td>
                                                                                <td width="37px" align="left">
                                                                                    <img style="cursor: hand" align="middle" class="dtm" src="/_imgs/btn_off_cal.gif">
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                </td>
                                                            </tr>
                                                         </table>
                                                    </td>
                                                    <td style="text-align: right" colspan="2" align="right">
                                                    <button id="btnSearch" type="button" onclick="doQuery(true)">
                                                        查 询</button>
                                                </td>
                                            </tr>
                                         </table>
                                    </td>
                                    
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
                <!--End of 下拉列表控件-->
            </td>
        </tr>
        <tr height="10">
            <td>
            </td>
        </tr>
        <tr>
            <td>
                <iframe id="appIframe" url="Khfp_fpXjy_Grid.aspx" width="100%" height="100%" frameborder="0"
                    scrolling="no"></iframe>
            </td>
        </tr>
    </table>
</body>
</html>
